<%include file="header.html"/>
<%include file="searchbar.html"/>
<link href="/static/itemlist.css" rel="stylesheet" type="text/css">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="tbspan">
  <tr> 
  <td width="99%" height="476" valign="top">
	<table width="99%" border="0" cellspacing="0" cellpadding="0" style="padding-top:1px">
      <tr> 
        <td width="1%" height="27" align="center" bgcolor="#CEE3E6">&nbsp;</td>
        <td width="3%" align="center" bgcolor="#CEE3E6">&nbsp;</td>
        <td width="20%" bgcolor="#CEE3E6" style="padding-left:5px; padding-top:4px;">当前位置：<a href='/'>主页</a>&gt;<a href='/userrank/${order}/1'>名人堂</a></td>
        <td bgcolor="#CEE3E6" style="padding-left:5px;padding-top:4px;">
          <select id="order" class="op1" onchange='window.location.href="/userrank/"+document.getElementById("order").value+"/1";'>
          % for opt,txt in {'clicks':u'按点击排序','count':u'按发布个数','comments':u'按评论排序','subs':u'按弹幕排序'}.items():
            % if opt == order:
              <option value="${opt}" selected>${txt}</option>
            % else:
              <option value="${opt}">${txt}</option>
            % endif
          % endfor
          </select>
        </td>
		<td bgcolor="#cee3e6" style="padding-left: 5px; padding-top: 4px;"></td>
        <td height="3" colspan="3" bgcolor="#ECF4F5" style="padding:0px"></td>
      </tr>
    </table>
	<table width="99%" cellspacing="0" cellpadding="0" class="bookcaseTable">
        <tbody>
		<tr style="font-size:12px">
			<th width="50">排名</th>
            <th width="130" align="left">用户名</th>
            <th align="left">代表作</th>
            <th width="120" align="center">上次上传时间</th>
            <th width="50" align="center">发布个数</th>
            <th width="50" align="center">总点击</th>
            <th width="50" align="center">总评论</th>
            <th width="50" align="center">总弹幕</th>
            <th width="50" align="center">总收藏</th>
        </tr>
	<!-- uid,nickname,id,title,osite,lastpostdate, -->
	%for i in range(len(ud)):
		%if i%2==0:
		<tr id="tr_book_${ud[i][0]}">
		%else:
        <tr bgcolor="#f2f2f2" id="tr_book_${ud[i][0]}">
		%endif
			<td align="center">${start+i+1}</td>
			<td> 
				<a href="/user/${ud[i][0]}" target="_blank">${ud[i][1]}</a>
			</td>
			<td>
				<a href="/id/${ud[i][2]}.001" target="_blank">${ud[i][3]}</a> <em>-${ud[i][4]}</em>
			</td>
			<td align="center">
				${ud[i][5]}
			</td>
			<td align="center">${ud[i][6]}</td>
			<td align="center">${ud[i][7]}</td>
			<td align="center">${ud[i][8]}</td>
			<td align="center">${ud[i][9]}</td>
			<td align="center">${ud[i][10]}</td>
		</tr>
	%endfor
    	</tbody>
	</table>
    <table width="100%" border="0" cellpadding="1" cellspacing="1">
      <tr> 
        <!-- nav pages -->
        <td height="25" align="center"> 共${pages}页/${records}条记录 &nbsp;
        <a href="/userrank/${order}/1">首页</a>
        % if cur != 1:
          <a href="/userrank/${order}/${prev}">上一页</a>
        % endif
        % for p in navs:
          % if p == cur:
            ${p}
          % else:
            <a href="/userrank/${order}/${p}">[${p}]</a>
          % endif
        % endfor
        % if cur != last:
          <a href="/userrank/${order}/${next}">下一页</a>
        % endif
        <a href="/userrank/${order}/${last}">末页</a>
          <select name='sldd' style='width:78' onchange='location.href=this.options[this.selectedIndex].value;'>
            % for p in xrange(1,pages+1):
              % if p == cur:
                <option value='/userrank/${order}/${p}' selected>${p}</option>
              % else:
                <option value='/userrank/${order}/${p}'>${p}</option>
              % endif
            % endfor
          </select>
        </td>
        <!-- nav pages -->
      </tr>
    </table>
  </td>
  </tr>
</table>
<%include file="footer.html"/>
